﻿
    using Chain.BLL;
    using Chain.Model;
    using Chain.Wechat;
    using System;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
using System.Data;
    public partial class membershipcard : Page
    {

        private Chain.BLL.Mem MemIBll = new Chain.BLL.Mem();
        protected decimal SmallChange = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request.Cookies["uid"].Value);
                Chain.Model.Mem MemModel = this.MemIBll.GetModel(MemID);
                BusinessLogic dr = new BusinessLogic();
                dr.DrawImage3(MemModel);
                SmallChange = MemModel.SmallChange;
                this.imgMemCard.Src = string.Concat(new object[] { "../Upload/WeiXin/Images/", MemModel.MemCard, "-MemCard.jpg?rd=", new Random().Next(0x1869f) });
                Chain.BLL.SysParameter BllSysParameter = new Chain.BLL.SysParameter();
                DataSet ds = BllSysParameter.GetAllList();
                if (ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["IsDepositToWxRedPocket"] != DBNull.Value && (int)ds.Tables[0].Rows[0]["IsDepositToWxRedPocket"] == 0)
                {
                    this.button_1.Visible = false;
                }
            }
        }
    }


